\hypertarget{class_index_handler}{\section{Index\-Handler Class Reference}
\label{class_index_handler}\index{Index\-Handler@{Index\-Handler}}
}


{\ttfamily \#include $<$Index\-Handler.\-h$>$}

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_index_handler_a27748387661142a2eb545be6f0499996}{Index\-Handler} ()
\item 
\hyperlink{class_index_handler_a222c2e9f12fef0e242c7870836df88e8}{Index\-Handler} (char type)
\item 
void \hyperlink{class_index_handler_a4a679d3e7915dd4de84bc3dc2840c0e0}{add\-Terms\-From\-Document} (\hyperlink{class_document}{Document} d)
\item 
\hyperlink{class_term}{Term} $\ast$ \hyperlink{class_index_handler_a708294bf8d11693889abb4ad14b6f21a}{insert} (string term)
\item 
\hyperlink{class_term}{Term} $\ast$ \hyperlink{class_index_handler_adaa31e271a00e143414e9106b22cabc0}{search} (string query)
\item 
void \hyperlink{class_index_handler_ab8e7ca402d1071b136c888a0b22e2c02}{write\-Index\-To\-File} (string file\-Path)
\item 
void \hyperlink{class_index_handler_a874bb78c623562a0c966eb042a6de281}{read\-Index\-From\-File} (string file\-Path)
\item 
void \hyperlink{class_index_handler_aa2bf2f92746644864ca2f603a996a15a}{output\-Raw\-Search} (string query)
\end{DoxyCompactItemize}


\subsection{Constructor \& Destructor Documentation}
\hypertarget{class_index_handler_a27748387661142a2eb545be6f0499996}{\index{Index\-Handler@{Index\-Handler}!Index\-Handler@{Index\-Handler}}
\index{Index\-Handler@{Index\-Handler}!IndexHandler@{Index\-Handler}}
\subsubsection[{Index\-Handler}]{\setlength{\rightskip}{0pt plus 5cm}Index\-Handler\-::\-Index\-Handler (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{class_index_handler_a27748387661142a2eb545be6f0499996}
If nothing is specified, use an A\-V\-L tree by default

Default constructor uses an A\-V\-L tree as its structure \hypertarget{class_index_handler_a222c2e9f12fef0e242c7870836df88e8}{\index{Index\-Handler@{Index\-Handler}!Index\-Handler@{Index\-Handler}}
\index{Index\-Handler@{Index\-Handler}!IndexHandler@{Index\-Handler}}
\subsubsection[{Index\-Handler}]{\setlength{\rightskip}{0pt plus 5cm}Index\-Handler\-::\-Index\-Handler (
\begin{DoxyParamCaption}
\item[{char}]{type}
\end{DoxyParamCaption}
)}}\label{class_index_handler_a222c2e9f12fef0e242c7870836df88e8}
Constructor allowing selection of an \hyperlink{class_a_v_l_tree}{A\-V\-L\-Tree} or Hash\-Table 
\begin{DoxyParams}{Parameters}
{\em type} & char representing structure type a=A\-V\-L, b=Hash\-Table\\
\hline
\end{DoxyParams}
Constructor for \hyperlink{class_index_handler}{Index\-Handler} 
\begin{DoxyParams}{Parameters}
{\em type} & the type of data structure to use a=avl tree, b=hash table, default to avl tree \\
\hline
\end{DoxyParams}


\subsection{Member Function Documentation}
\hypertarget{class_index_handler_a4a679d3e7915dd4de84bc3dc2840c0e0}{\index{Index\-Handler@{Index\-Handler}!add\-Terms\-From\-Document@{add\-Terms\-From\-Document}}
\index{add\-Terms\-From\-Document@{add\-Terms\-From\-Document}!IndexHandler@{Index\-Handler}}
\subsubsection[{add\-Terms\-From\-Document}]{\setlength{\rightskip}{0pt plus 5cm}void Index\-Handler\-::add\-Terms\-From\-Document (
\begin{DoxyParamCaption}
\item[{{\bf Document}}]{d}
\end{DoxyParamCaption}
)}}\label{class_index_handler_a4a679d3e7915dd4de84bc3dc2840c0e0}
\hypertarget{class_index_handler_a708294bf8d11693889abb4ad14b6f21a}{\index{Index\-Handler@{Index\-Handler}!insert@{insert}}
\index{insert@{insert}!IndexHandler@{Index\-Handler}}
\subsubsection[{insert}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Term} $\ast$ Index\-Handler\-::insert (
\begin{DoxyParamCaption}
\item[{string}]{term}
\end{DoxyParamCaption}
)}}\label{class_index_handler_a708294bf8d11693889abb4ad14b6f21a}
Check if a term exists in the tree and if not, insert it 
\begin{DoxyParams}{Parameters}
{\em term} & string to add as a term \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
ptr to newly created term or the old term that was found
\end{DoxyReturn}
Insert a term and return a pointer to the new term 
\begin{DoxyParams}{Parameters}
{\em term} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
ptr to term 
\end{DoxyReturn}
\hypertarget{class_index_handler_aa2bf2f92746644864ca2f603a996a15a}{\index{Index\-Handler@{Index\-Handler}!output\-Raw\-Search@{output\-Raw\-Search}}
\index{output\-Raw\-Search@{output\-Raw\-Search}!IndexHandler@{Index\-Handler}}
\subsubsection[{output\-Raw\-Search}]{\setlength{\rightskip}{0pt plus 5cm}void Index\-Handler\-::output\-Raw\-Search (
\begin{DoxyParamCaption}
\item[{string}]{query}
\end{DoxyParamCaption}
)}}\label{class_index_handler_aa2bf2f92746644864ca2f603a996a15a}
Take a search query, parse it and output results 
\begin{DoxyParams}{Parameters}
{\em query} & Output the results of an unparsed search query \\
\hline
{\em query} & unparsed search query \\
\hline
\end{DoxyParams}
\hypertarget{class_index_handler_a874bb78c623562a0c966eb042a6de281}{\index{Index\-Handler@{Index\-Handler}!read\-Index\-From\-File@{read\-Index\-From\-File}}
\index{read\-Index\-From\-File@{read\-Index\-From\-File}!IndexHandler@{Index\-Handler}}
\subsubsection[{read\-Index\-From\-File}]{\setlength{\rightskip}{0pt plus 5cm}void Index\-Handler\-::read\-Index\-From\-File (
\begin{DoxyParamCaption}
\item[{string}]{file\-Path}
\end{DoxyParamCaption}
)}}\label{class_index_handler_a874bb78c623562a0c966eb042a6de281}
Function to read the tree index from a file and back into the structure

Read the inverted file index from a file and back into the data structure 
\begin{DoxyParams}{Parameters}
{\em file\-Path} & \\
\hline
\end{DoxyParams}
\hypertarget{class_index_handler_adaa31e271a00e143414e9106b22cabc0}{\index{Index\-Handler@{Index\-Handler}!search@{search}}
\index{search@{search}!IndexHandler@{Index\-Handler}}
\subsubsection[{search}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Term} $\ast$ Index\-Handler\-::search (
\begin{DoxyParamCaption}
\item[{string}]{query}
\end{DoxyParamCaption}
)}}\label{class_index_handler_adaa31e271a00e143414e9106b22cabc0}
Search for a term in the current tree 
\begin{DoxyParams}{Parameters}
{\em query} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
ptr to \hyperlink{class_term}{Term} object
\end{DoxyReturn}
Return the term with a given index 
\begin{DoxyParams}{Parameters}
{\em query} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
pointer to the term 
\end{DoxyReturn}
\hypertarget{class_index_handler_ab8e7ca402d1071b136c888a0b22e2c02}{\index{Index\-Handler@{Index\-Handler}!write\-Index\-To\-File@{write\-Index\-To\-File}}
\index{write\-Index\-To\-File@{write\-Index\-To\-File}!IndexHandler@{Index\-Handler}}
\subsubsection[{write\-Index\-To\-File}]{\setlength{\rightskip}{0pt plus 5cm}void Index\-Handler\-::write\-Index\-To\-File (
\begin{DoxyParamCaption}
\item[{string}]{file\-Path}
\end{DoxyParamCaption}
)}}\label{class_index_handler_ab8e7ca402d1071b136c888a0b22e2c02}
Function to write the tree or hash table to a file

Write the inverted file index to a file (uses the methods defined in the \hyperlink{class_a_v_l_tree}{A\-V\-L\-Tree} and Hash\-Table adapters) 
\begin{DoxyParams}{Parameters}
{\em file\-Path} & file to output to \\
\hline
\end{DoxyParams}


The documentation for this class was generated from the following files\-:\begin{DoxyCompactItemize}
\item 
C\-:/\-Users/\-Christopher/\-Documents/\-Net\-Beans\-Projects/pbsearch/\-Search\-Engine/\hyperlink{_index_handler_8h}{Index\-Handler.\-h}\item 
C\-:/\-Users/\-Christopher/\-Documents/\-Net\-Beans\-Projects/pbsearch/\-Search\-Engine/\hyperlink{_index_handler_8cpp}{Index\-Handler.\-cpp}\end{DoxyCompactItemize}
